<h1 class="right">إدارة سندات الخدمات</h1><!--<div class="h1-dot"></div><a href="#add_client" class="add_furnitures_pop">
  <img src="images/add-icon.png" align="left" class="left" alt=""/>
</a> -->
<div id="add_client" class="zoom-anim-dialog mfp-hide view-booking-popup">
	<?php //require("service_vouchers/create.php"); ?> 
</div>
<span class="left grey medium margin-left11 margin-top5"><?php echo date('g:ia d/m/Y');?></span>
<div class="clear"></div>
<div id="dashboard-container">
<!--<div class="customers-filter">
    	<table class="furnitures-filter">
       <tr>
              <td style="width:18px;">من</td>
              <td style="width:70px; padding-left:20px;"><input type="text" class="auto-input" name="price" value=""></td>
              <td style="width:25px;">الى</td>
              <td style="width:70px; padding-left:20px;"><input type="text" class="auto-input" name="price" value=""></td>
              <td style="width:105px;">رقم العقد / الحجز</td>
              <td style="width:70px; padding-left:20px;"><input type="text" class="auto-input" name="price" value=""></td>
              <td style="width:62px;">رقم السند</td>
              <td style="width:70px; padding-left:20px;"><input type="text" class="xsmall-input" name="price" value=""></td>
              <td style=""><select class="small-select"><option value="select1">select1</option></select></td>
              <td style=""><a href="#"><div class="export-button">بحث</div></a></td>
              <input name="filter" class="client-id" type="hidden" value="2"/>
            </tr>
      </table>
    </div>-->
	<div class="dashboard-row">
    
    	<table class="customers-table">
        	<tr class="customers-table-head">
            	<td widthf="160px">رقم السند</td>
                
                <td widthf="100px">رقم العقد / الحجز</td>
                <td widthf="110px">استلمت من</td>
                <td widthf="100px">المبلغ</td>
                <td widthf="100px">من أجل </td>
                <td widthf="100px">طريقة الدفع</td>
				<td widthf="100px">المستلم</td>
               
                <td widthf="100px">التاريخ</td>
                <td widthf="100px">العمليات</td>
            </tr>
			<?php
			foreach($payments as $payment){
			
			?>
                <tr class="page1">
                    <input class="client-id" type="hidden" value=""/>
                    <td ><?php echo $payment['payment_id']; ?></td>
                    
                    <td ><?php echo $payment['contract_id']; ?></td>
                    <td ><?php echo $payment['payer']; ?></td>
                    <td ><?php echo $payment['amount']; ?></td>
                     <td ><?php echo $payment['reason']; ?></td>
                     <td ><?php echo $payment['paymen_method']; ?></td>
					  <td ><?php echo $payment['recipient']; ?></td>
                   
                    <td > <?php echo $payment['miladi_date'] ;?></td>
                    <td>
                      <a href="view-pop-ups/service.php?id=<?php echo $payment['payment_id']; ?>" class="ajax-pop-up-magnific-modal">
                        <img src="images/view.png" class="" align="" alt="View" title="عرض السند"/>
                      </a> 
                      
                      <!--<a href="edit-pop-ups/service.php?id=<?php echo $payment['payment_id']; ?>" class="ajax-pop-up-magnific-modal">
                        <img src="images/edit.png" class="" align="" alt="View" title="عرض السند"/>
                      </a>-->
						<?php
						if ($_SESSION['r']<=1)
						{
						?>
							<a href="#" class="delete"><img src="images/x.png" class="margin-right5" align="" alt="Delete"/></a>
							<input class="delete-id" type="hidden" value="<?php echo $payment['payment_id']; ?>"/>
							<input class="filter-id" type="hidden" value="10"/> <!-- 10 means delete service vouchers -->
						<?php
						}
						?>
					 
					 
					<?php } ?>
                </tr>
				
                </table>
				
    </div> 
	
	<?php
          $start = $page * 20 -19;
          $end  = $start + 19;
          if($end > $totalPages)
            $end = $totalPages;
          
	  if(!empty($payments)) { ?>
        <div class="clear"></div>
        <div class="relative">
          <span class="middle xsmall showing-results absolute">عرض النتائج <?php echo $start; ?> - <?php echo $end; ?> من إجمالى <?php echo $totalPages; ?></span>
          <div id="payment-selection" class="center"></div>
        </div>
        <div class="hidden totalPages"><?php if(isset($totalPages)) {echo $totalPages;} ?></div>
        <div class="hidden currentPage"><?php if(isset($page)) {echo $page;} ?></div>
        <?php } ?>
	 
         <div class="clear"></div>                    
</div>
<br />